package com.alicp.jetcache.autoconfigure;

import com.alicp.jetcache.anno.support.GlobalCacheConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import javax.annotation.PostConstruct;

/**
 * @Author liuzhihao
 * @Date 2022.01.12
 * @Version 1.0.0
 * @Description 解决JetcacheAutoConfiguration循环依赖问题
 */
@Configuration
@Slf4j
@ConditionalOnClass(GlobalCacheConfig.class)
@Import({
        RedisAutoConfiguration.class,
        CaffeineAutoConfiguration.class,
        MockRemoteCacheAutoConfiguration.class,
        LinkedHashMapAutoConfiguration.class,
        RedisLettuceAutoConfiguration.class,
        RedisSpringDataAutoConfiguration.class
})
public class JetCacheAutoConfiguration {

    @PostConstruct
    public void postConstruct() {
        log.info("[APP] |- jetcache 初始化完成");
    }
}
